'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    await queryInterface.bulkInsert('Courses', [
      {
        categoryId: 1,
        userId: 1,
        name: 'HTML',
        image: 'https://www.baidu.com/img/flexible/logo/pc/result.png',
        recommended: true,
        introductory: true,
        content: 'HTML是超文本标记语言',
        likeCount: 0,
        chaptersCount: 0,
        createdAt: new Date(),
        updatedAt: new Date()
      },
      {
        categoryId: 1,
        userId: 1,
        name: 'CSS',
        image: 'https://www.baidu.com/img/flexible/logo/pc/result.png',
        recommended: true,
        introductory: true,
        content: 'CSS是层叠样式表',
        likeCount: 0,
        chaptersCount: 0,
        createdAt: new Date(),
        updatedAt: new Date()
      }
    ],{});
  },

  async down (queryInterface, Sequelize) {
    await queryInterface.bulkDelete('Courses', null, {});
  }
};
